package com.zoo.wuhua.entity;

import java.util.Date;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * <b>默认jackson解析对象示例</b><br>
 *
 * @author zhangli7@yusys.com.cn
 * @since 2019年10月29日 下午6:27:17
 */
@Component
@ConfigurationProperties(prefix = "book")
@JsonIgnoreProperties({ "name", "price" })
public class JacksonBook {

	private String name;
	@JsonIgnore
	private String author;
	private double price;
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date publicDate;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public Date getPublicDate() {
		return publicDate;
	}

	public void setPublicDate(Date publicDate) {
		this.publicDate = publicDate;
	}

	@Override
	public String toString() {
		return "Book [name=" + name + ", author=" + author + ", price=" + price + ", publicDate=" + publicDate + "]";
	}

}
